import { IFeidaoAiBrowserComponent } from '@dfeidao/atom-web/interfaces';
import fire from '@dfeidao/atom-web/msg/fire';

import get from '@dfeidao/atom-web/local/get';

export default async function a013(fd: IFeidaoAiBrowserComponent, e: Event) {

	const ss = e.currentTarget as HTMLSpanElement;
	const risk_po_name = ss.getAttribute('data-name1');
	const risk_po_name_no = ss.getAttribute('data-no1');
	const risk_po_type_no = ss.getAttribute('data-no2');
	const risk_po_type_name = ss.getAttribute('data-name2');


	console.log("KKKKKKKKK--->", risk_po_name);
	console.log("6666666--->", risk_po_name_no);

	// 点击编号跳转详情页面
	let val1 = get(fd, 'canshu');
	if (!val1) {
		const nodes = fd.data.node.querySelector<HTMLDivElement>('[data-feidao-actions="click:a003"]');
		val1 = nodes.getAttribute('data-no');
	}

	const val = { val1, risk_po_name, risk_po_name_no, risk_po_type_name, risk_po_type_no };

	console.log("有无参数！！！", val);

	if (val) {

		console.log("隐藏跳转页=》", val);
		fire('zj-000004', 'a001', val);

		// 隐藏主页面
		const d = fd.data.node.querySelector<HTMLDListElement>('[data-zname="zong"]');
		d.setAttribute('class', 'display-n');
	} else {
		alert('请选择要修改数据！');
	}







}
